<%= javascript_include_tag 'growl.js' %>
<%= javascript_include_tag 'store.js' %>
<%= javascript_include_tag 'jquery.sortable.js' %>
<%= javascript_include_tag 'sort_products.js' %>
<div id='breadcrumb'>
  <a href="/">首页</a>&gt;<a href="/categories/<%=@category.id%>"><%=h @category.name%></a>&gt;子类别排序(直接拖拽)
</div>
<ol id='sort_ul'>
  <% if @categories %>

    <% for c in @categories %>
      <li class='sortableitem' id='<%=c.id%>'>
        <%=h c.name %>
      </li>
    <% end %>
  </ol>
  <button   onclick="print_ul('/categories/update_sort_order')">保存顺序</button>
  <a href="/categories/<%=@category.id%>">返回</a>
<% end %>

<div style=""display:none id='hidden_form'>
  <%= form_tag('/categories')  %>
</div>